package com.jy.api.controller;

import com.jy.api.service.TableService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("v1/table")
public class TableController {
    @Resource
    private TableService tableService;

    @RequestMapping(method = RequestMethod.GET, value = "/backup")
    public ResponseEntity backup() {
        return ResponseEntity.ok(tableService.backup());
    }
}
